package blazingbubble.lobby.command.net;

import blazingbubble.graphics.lobby.IGameListUpdateListener;
import blazingbubble.lobby.command.GameListRequestCommand;
import blazingbubble.lobby.command.LobbyCommandFactory;
import spark.network.Sender;
import spark.network.NetworkConnection;

public class NetLobbyCommandFactory extends LobbyCommandFactory {
	private NetCreateGameCommand createGame;
	private NetLoginCommand login;
	private NetLogoutCommand logout;
	private NetGameListRequestCommand gameListRequest;

	public void startup(Sender sender, NetworkConnection serverConnection, int queryPort) {
		login = new NetLoginCommand(sender, serverConnection);
		login.setResponsePort(queryPort);

		createGame = new NetCreateGameCommand(sender, serverConnection);

		logout = new NetLogoutCommand(sender, serverConnection);
		gameListRequest = new NetGameListRequestCommand(sender, serverConnection);
	}

	@Override
	public NetCreateGameCommand getCreateGame() {
		return createGame;
	}

	@Override
	public NetLoginCommand getLogin() {
		return login;
	}

	@Override
	public NetLogoutCommand getLogout() {
		return logout;
	}

	@Override
	public GameListRequestCommand getGameList() {
		return gameListRequest;
	}
}
